package com.springboot.model;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.springboot.extend.CustomerTypeHandler;
import lombok.Data;

/**
 * @Author: TongRui乀
 * @Date: 2019-12-03 17:33
 * @description：
 */
@Data
@TableName(value = "t_user", autoResultMap = true)
public class Student {

    @TableId(type = IdType.AUTO)
    private Long id;

    private String name;


    private AgeEnum age;

    @TableField()
    private String email;

    /**
     *  exist 是否为数据库字段
     */
    @TableField(exist = false)
    private String secondName;

    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONObject password;

}
